package com.originskyseed.platform.user.service;

import java.util.List;
import java.util.Map;

import com.originskyseed.platform.core.base.BasePage;
import com.originskyseed.platform.user.model.Family;

/**
 * 家族信息Service接口类（OSI_FAMILY）
 *
 * @author tangwanghui
 */
public interface IFamilyService {

	/**
	 * 删除记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(Family record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(Family record) throws Exception;

	/**
	 * 批量插入记录
	 *
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public int insertBatchFamily(List<Family> list) throws Exception;

	/**
	 * 更新记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(Family record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(Family record) throws Exception;

	/**
	 * 查询记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public Family selectByPrimaryKey(String id) throws Exception;

	/**
	 * 查询通过对象属性记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public Family selectByFimily(Family record) throws Exception;

	/**
	 * 查询列表
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<Family> selectList(Family record) throws Exception;

	/**
	 * 分页查询列表
	 *
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<Family> selectListByPage(Map<String, Object> params, BasePage<Family> page) throws Exception;

	/**
	 * 开放平台选择家族
	 *
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<Family> selectFamilyListByPage(Map<String, Object> params, BasePage<Family> page) throws Exception;

	/**
	 * 查询家族id是否存在
	 *
	 * @param familyIds
	 * @return
	 * @throws Exception
	 */
	public List<String> selectFamilyIds(List<String> familyIds) throws Exception;

	/**
	 * 根据userId查询记录
	 *
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public Family selectByUserId(String userId) throws Exception;
}
